package com.future.mayi.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import com.future.mayi.model.GoodsBatchModel;
import com.future.mayi.view.GoodsBatchOrderItemView;


public class GoodsBatchOrderAdapter extends BaseRecyclerViewAdapter<GoodsBatchModel> {

    public GoodsBatchOrderAdapter(Context context) {
        super(context, null);
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(new GoodsBatchOrderItemView(mContext));
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
        ViewHolder holder = (ViewHolder) viewHolder;
        holder.itemView.setModel(getItem(position), position);
    }


    class ViewHolder extends RecyclerView.ViewHolder {
        GoodsBatchOrderItemView itemView;

        public ViewHolder(View itemView) {
            super(itemView);
            this.itemView = (GoodsBatchOrderItemView) itemView;
        }
    }



}
